Partial Evaluation of Pattern Matching in Strings, revisited

نویسندگان

  • Bernd Grobauer
  • Julia L. Lawall
چکیده

Specializing string matchers is a canonical example of partial evaluation. A naive implementation of a string matcher repeatedly matches a pattern against every substring of the data string; this operation should intuitively benefit from specializing the matcher with respect to the pattern. In practice, however, producing an efficient implementation by performing this specialization using standard partial-evaluation techniques has been found to require non-trivial binding-time improvements. Starting with a naive matcher, we thus present a derivation of a binding-time improved string matcher. We prove its correctness and show that specialization with respect to a pattern yields a matcher with code size linear in the length of the pattern and running time linear in the length of its input. We then consider several variants of matchers that specialize well, amongst them the first such matcher presented in the literature, and we demonstrate how variants can be derived from each other systematically. ∗Ny Munkegade, Building 540, DK-8000 Aarhus C, Denmark. E-mail: [email protected] †Basic Research in Computer Science (http://www.brics.dk), Centre of the Danish National Research Foundation. ‡Datalogisk Institut, Universitetsparken 1, DK-2100 Copenhagen, Denmark E-mail: [email protected]

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

A Fast and Accurate Global Maximum Power Point Tracking Method for Solar Strings under Partial Shading Conditions

This paper presents a model-based approach for the global maximum power point (GMPP) tracking of solar strings under partial shading conditions. In the proposed method, the GMPP voltage is estimated without any need to solve numerically the implicit and nonlinear equations of the photovoltaic (PV) string model. In contrast to the existing methods in which first the locations of all the local pe...

متن کامل

Truly Subquadratic-Time Extension Queries and Periodicity Detection in Strings with Uncertainties

Strings with don’t care symbols, also called partial words, and more general indeterminate strings are a natural representation of strings containing uncertain symbols. A considerable effort has been made to obtain efficient algorithms for pattern matching and periodicity detection in such strings. Among those, a number of algorithms have been proposed that behave well on random data, but still...

متن کامل

Partial Evaluation applied to Symbolic Pattern Matching with Intelligent Backtrack

Partial version presented at Workshop for Static Analysis (Bor-deaux France) october 1992. Abstract Symbolic pattern matching as ooered by Lisp dialects allows to scan Sexpressions, to verify their shape and to extract or compare subparts of them. A rich set of patterns exists and among them alternate patterns. Such patterns are handled through backtrack: a failure forces the pattern matcher to...

متن کامل

Flexible and Efficient Algorithms for Abelian Matching in Strings

The abelian pattern matching problem consists in finding all substrings of a text which are permutations of a given pattern. This problem finds application in many areas and can be solved in linear time by a näıve sliding window approach. In this short communication we present a new class of algorithms based on a new efficient fingerprint computation approach, called Heap-Counting, which turns ...

متن کامل

Cross-Linguistic Transfer Revisited: The Case of English and Persian

The present study sought to investigate the evidence for cross-linguistic transfer in a partial English immersion and non-immersion educational setting. To this end, a total of 145 first, third and fifth graders in a partial English immersion program and 95 students from the same grade levels in a non-immersion program were chosen. Six different English and Persian tests were administered: the ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:
  • Nord. J. Comput.

دوره 8  شماره 

صفحات  -

تاریخ انتشار 2001